package com.iplay.thezen.factoryMethod;

/**
 * @author dangwu
 * @since 2021/9/7 4:01 下午
 */
public class ConcreteCreator extends Creator{

    @Override
    public <T extends Product> T createProduct(Class<T> c) {
        Product product = null;
        try{
            product = (Product) Class.forName(c.getName()).newInstance();
        }catch (Exception e){

        }
        return (T)product;
    }
}
